<%-- 
    Document   : edit_student
    Created on : Dec 10, 2011, 4:07:35 PM
    Author     : THIENSUHACK
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<% request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    response.setContentType("text/html; charset=UTF-8"); 
%>
<%@page import="GetData.CharsetFilter"%>
<%@page import="java.util.Calendar"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="GetData.DataWS"%>
<%@page import="DTO.sinhvien"%>

<%

sinhvien sv=new sinhvien();
request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    response.setContentType("text/html; charset=UTF-8"); 

    sv.setMasv(request.getParameter("masv"));   
sv.setHoten(request.getParameter("hoten"));   
sv.setGioitinh(Short.valueOf(request.getParameter("gioitinh")));
sv.setDiachi(request.getParameter("diachi"));
sv.setEmail(request.getParameter("email"));
sv.setMatkhau(request.getParameter("matkhau"));
sv.setPhone(request.getParameter("phone"));
sv.setTrangthai(Short.valueOf(request.getParameter("trangthai")));
sv.setNgaysinh(request.getParameter("ngaysinh"));
  
//CharsetFilter ab=new CharsetFilter();
//sv.setHoten(ab.toUTF8(sv.getHoten()));
//sv.setDiachi(ab.toUTF8(sv.getDiachi()));
   int result=0;
   DataWS a=new DataWS(); 
//    Gets a calendar using the default time zone and locale.
   
  result=a.capnhatsinhvien(sv.getMasv(),sv.getHoten(),sv.getGioitinh(),sv.getNgaysinh(),sv.getDiachi(),sv.getEmail(),sv.getPhone(),sv.getMatkhau(),sv.getTrangthai());
   if(result>0)
             {
       //out.print("Cập Nhật Thành Công");
   }
   else
       //out.print("Cập Nhật Thất Bại");
 
           %>
           <script>
               window.location="/DKTC/admin/index.jsp?page=list_student";
           </script>